<!DOCTYPE html><html lang="zh-CN" data-theme="light"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, initial-scale=1.0,viewport-fit=cover"><title>Xuan的博客 - Xuan.top</title><meta name="author" content="Xuan"><meta name="copyright" content="Xuan"><meta name="format-detection" content="telephone=no"><meta name="theme-color" content="#ffffff"><meta property="og:type" content="website">
<meta property="og:title" content="Xuan的博客">
<meta property="og:url" content="http://leesmile.gitee.io/smile/page/10/index.html">
<meta property="og:site_name" content="Xuan的博客">
<meta property="og:locale" content="zh_CN">
<meta property="og:image" content="https://leesmile.gitee.io/smile/img/avatarImg.bmp">
<meta property="article:author" content="Xuan">
<meta name="twitter:card" content="summary">
<meta name="twitter:image" content="https://leesmile.gitee.io/smile/img/avatarImg.bmp"><link rel="shortcut icon" href="/smile/img/favicon.png"><link rel="canonical" href="http://leesmile.gitee.io/smile/page/10/index.html"><link rel="preconnect" href="//cdn.jsdelivr.net"/><link rel="preconnect" href="//busuanzi.ibruce.info"/><link rel="stylesheet" href="/smile/css/index.css"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css" media="print" onload="this.media='all'"><link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.min.css" media="print" onload="this.media='all'"><script>const GLOBAL_CONFIG = {
  root: '/smile/',
  algolia: undefined,
  localSearch: undefined,
  translate: undefined,
  noticeOutdate: undefined,
  highlight: {"plugin":"highlighjs","highlightCopy":true,"highlightLang":true,"highlightHeightLimit":false},
  copy: {
    success: '复制成功',
    error: '复制错误',
    noSupport: '浏览器不支持'
  },
  relativeDate: {
    homepage: false,
    post: false
  },
  runtime: '',
  dateSuffix: {
    just: '刚刚',
    min: '分钟前',
    hour: '小时前',
    day: '天前',
    month: '个月前'
  },
  copyright: undefined,
  lightbox: 'fancybox',
  Snackbar: undefined,
  source: {
    justifiedGallery: {
      js: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.js',
      css: 'https://cdn.jsdelivr.net/npm/flickr-justified-gallery/dist/fjGallery.min.css'
    }
  },
  isPhotoFigcaption: false,
  islazyload: false,
  isAnchor: false,
  percent: {
    toc: true,
    rightside: false,
  },
  autoDarkmode: false
}</script><script id="config-diff">var GLOBAL_CONFIG_SITE = {
  title: 'Xuan的博客',
  isPost: false,
  isHome: true,
  isHighlightShrink: false,
  isToc: false,
  postUpdate: '2024-04-09 09:45:27'
}</script><noscript><style type="text/css">
  #nav {
    opacity: 1
  }
  .justified-gallery img {
    opacity: 1
  }

  #recent-posts time,
  #post-meta time {
    display: inline !important
  }
</style></noscript><script>(win=>{
    win.saveToLocal = {
      set: function setWithExpiry(key, value, ttl) {
        if (ttl === 0) return
        const now = new Date()
        const expiryDay = ttl * 86400000
        const item = {
          value: value,
          expiry: now.getTime() + expiryDay,
        }
        localStorage.setItem(key, JSON.stringify(item))
      },

      get: function getWithExpiry(key) {
        const itemStr = localStorage.getItem(key)

        if (!itemStr) {
          return undefined
        }
        const item = JSON.parse(itemStr)
        const now = new Date()

        if (now.getTime() > item.expiry) {
          localStorage.removeItem(key)
          return undefined
        }
        return item.value
      }
    }
  
    win.getScript = url => new Promise((resolve, reject) => {
      const script = document.createElement('script')
      script.src = url
      script.async = true
      script.onerror = reject
      script.onload = script.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        script.onload = script.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(script)
    })
  
    win.getCSS = (url,id = false) => new Promise((resolve, reject) => {
      const link = document.createElement('link')
      link.rel = 'stylesheet'
      link.href = url
      if (id) link.id = id
      link.onerror = reject
      link.onload = link.onreadystatechange = function() {
        const loadState = this.readyState
        if (loadState && loadState !== 'loaded' && loadState !== 'complete') return
        link.onload = link.onreadystatechange = null
        resolve()
      }
      document.head.appendChild(link)
    })
  
      win.activateDarkMode = function () {
        document.documentElement.setAttribute('data-theme', 'dark')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#0d0d0d')
        }
      }
      win.activateLightMode = function () {
        document.documentElement.setAttribute('data-theme', 'light')
        if (document.querySelector('meta[name="theme-color"]') !== null) {
          document.querySelector('meta[name="theme-color"]').setAttribute('content', '#ffffff')
        }
      }
      const t = saveToLocal.get('theme')
    
          if (t === 'dark') activateDarkMode()
          else if (t === 'light') activateLightMode()
        
      const asideStatus = saveToLocal.get('aside-status')
      if (asideStatus !== undefined) {
        if (asideStatus === 'hide') {
          document.documentElement.classList.add('hide-aside')
        } else {
          document.documentElement.classList.remove('hide-aside')
        }
      }
    
    const detectApple = () => {
      if(/iPad|iPhone|iPod|Macintosh/.test(navigator.userAgent)){
        document.documentElement.classList.add('apple')
      }
    }
    detectApple()
    })(window)</script><link rel="stylesheet" href="/css/font.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/custom.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/whiteLine.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/progress_bar.css" media="defer" onload="this.media='all'"><link rel="stylesheet" href="/css/cat.css"><link rel="stylesheet" href="/css/readPercent.css"><link rel="stylesheet" href="https://cdn1.tianli0.top/npm/element-ui@2.15.6/packages/theme-chalk/lib/index.css"><div id="myscoll"></div><!-- hexo injector head_end start --><link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Zfour/Butterfly-double-row-display@1.00/cardlistpost.min.css"/>
<style>#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap > .tags:before {content:"\A";
  white-space: pre;}#recent-posts > .recent-post-item >.recent-post-info > .article-meta-wrap > .tags > .article-meta__separator{display:none}</style>
<link rel="stylesheet" href="https://npm.elemecdn.com/hexo-butterfly-footer-beautify@1.0.0/lib/runtime.css" media="print" onload="this.media='all'"><!-- hexo injector head_end end --><meta name="generator" content="Hexo 6.3.0"></head><body><div id="web_bg"></div><div id="sidebar"><div id="menu-mask"></div><div id="sidebar-menus"><div class="avatar-img is-center"><img src="https://leesmile.gitee.io/smile/img/avatarImg.bmp" onerror="onerror=null;src='/img/friend_404.gif'" alt="avatar"/></div><div class="sidebar-site-data site-data is-center"><a href="/smile/archives/"><div class="headline">文章</div><div class="length-num">142</div></a><a href="/smile/tags/"><div class="headline">标签</div><div class="length-num">36</div></a><a href="/smile/categories/"><div class="headline">分类</div><div class="length-num">32</div></a></div><hr class="custom-hr"/><div class="menus_items"><div class="menus_item"><a class="site-page" href="/smile/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/smile/archives/"><i class="fa-fw fas fa-archive"></i><span> 文章</span></a></div><div class="menus_item"><a class="site-page" href="/smile/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/smile/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div></div></div><div class="page home" id="body-wrap"><header class="full_page" id="page-header"><nav id="nav"><span id="blog-info"><a href="/smile/" title="Xuan的博客"><span class="site-name">Xuan的博客</span></a></span><div id="menus"><div class="menus_items"><div class="menus_item"><a class="site-page" href="/smile/"><i class="fa-fw fas fa-home"></i><span> 首页</span></a></div><div class="menus_item"><a class="site-page" href="/smile/archives/"><i class="fa-fw fas fa-archive"></i><span> 文章</span></a></div><div class="menus_item"><a class="site-page" href="/smile/tags/"><i class="fa-fw fas fa-tags"></i><span> 标签</span></a></div><div class="menus_item"><a class="site-page" href="/smile/categories/"><i class="fa-fw fas fa-folder-open"></i><span> 分类</span></a></div></div><div id="nav-right"><a class="meihua faa-parent animated-hover" onclick="toggleWinbox()" title="美化设置-自定义你的风格" id="meihua-button"><svg class="faa-tada icon" style="height:26px;width:26px;fill:currentColor;position:relative;top:8px" aria-hidden="true"><use xlink:href="#icon-tupian1"></use></svg></a><a class="sun_moon faa-parent animated-hover" onclick="switchNightMode()" title="浅色和深色模式转换" id="nightmode-button"><svg class="faa-tada" style="height:25px;width:25px;fill:currentColor;position:relative;top:7px" viewBox="0 0 1024 1024"><use id="modeicon" xlink:href="#icon-moon"></use></svg></a></div><div id="toggle-menu"><a class="site-page" href="javascript:void(0);"><i class="fas fa-bars fa-fw"></i></a></div></div></nav><div id="site-info"><h1 id="site-title">Xuan的博客</h1></div><div id="scroll-down"><i class="fas fa-angle-down scroll-down-effects"></i></div></header><main class="layout" id="content-inner"><div class="recent-posts" id="recent-posts"><div class="recent-post-item"><div class="recent-post-content left"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310201611564.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="Spring和SpringBoot区别"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/11/Java/SpringBoot/Spring%E5%92%8CSpringBoot%E5%8C%BA%E5%88%AB/" title="Spring和SpringBoot区别"><div class="article-title-link">Spring和SpringBoot区别</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-11T07:55:46.000Z" title="发表于 2023-07-11 15:55:46">2023-07-11</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/SpringBoot/">SpringBoot</a></span></div></div></div><a class="article-content" href="/smile/2023/07/11/Java/SpringBoot/Spring%E5%92%8CSpringBoot%E5%8C%BA%E5%88%AB/" title="Spring和SpringBoot区别"><div class="article-content-text">Spring和SpringBoot区别SpringBoot集成了Spring，最大的区别在于SpringBoot的自动装载机制
SpringBoot将最常用的依赖放在了一起，使用spring-boot-starter-web即可启动简单的web应用
SpringBoot内置了Tomcat
SpringBoot不需要像Spring一样配置繁杂的xml，只需要通过配置类@Configuration和继承对应的接口即可继续装配。
SpringBoot通过@EnableAutoConfiguration扫描再spring.factories中的配置，然后通过@XXXAutoConfiguration扫描配置所需要的Bean，自动扫描SpringBoot引入的依赖，只有用到的Bean才会被创建，最后放到IoC容器中
</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content right"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310201611564.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="Swagger"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/11/Java/SpringBoot/Swagger/" title="Swagger"><div class="article-title-link">Swagger</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-11T07:55:46.000Z" title="发表于 2023-07-11 15:55:46">2023-07-11</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/SpringBoot/">SpringBoot</a></span></div></div></div><a class="article-content" href="/smile/2023/07/11/Java/SpringBoot/Swagger/" title="Swagger"><div class="article-content-text">Swagger
通过pom文件导入依赖

123456789101112&lt;!-- Swagger --&gt;&lt;dependency&gt;    &lt;groupId&gt;io.springfox&lt;/groupId&gt;    &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;    &lt;version&gt;2.9.2&lt;/version&gt;&lt;/dependency&gt;&lt;dependency&gt;    &lt;groupId&gt;io.springfox&lt;/groupId&gt;    &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;    &lt;version&gt;2.9.2&lt;/version&gt;&lt;/dependency&gt;


添加SwaggerConfiguration的配置类
配置扫描的包名，以及项目的描述


12345678910111213141516171 ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content left"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310201611564.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="Spring和SpringBoot区别"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/10/Java/SpringBoot/SpringBoot%E6%95%B4%E5%90%88Mybatis/" title="Spring和SpringBoot区别"><div class="article-title-link">Spring和SpringBoot区别</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-10T01:53:47.000Z" title="发表于 2023-07-10 09:53:47">2023-07-10</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/SpringBoot/">SpringBoot</a></span></div></div></div><a class="article-content" href="/smile/2023/07/10/Java/SpringBoot/SpringBoot%E6%95%B4%E5%90%88Mybatis/" title="Spring和SpringBoot区别"><div class="article-content-text">Spring和SpringBoot区别整合Mybatis的作用MyBatis 可以帮助我们连接数据库，执行 SQL，返回结果集，通过接口的形式进行开发，但是不需要定义接口的实现类，而是用一个 XML 文件与接口进行对接，接口方法的 SQL 语句直接定义到 XML 文件中。
SpringBoot是如何装载Mybatis的Spring Boot 启动的时候会自动加载到 Mapper 接口，以及对应的 XML 文件，会自动生成一个代理类（相当于手写的实现类），并且会创建代理对象，注入到 IoC 中，可以直接取出来使用。
Spring Boot 之所以能自动加载组件，它的工作流程是，启动之后扫描第三方框架的 META-INF&#x2F;spring.factories，该文件中就配置了该框架所需要自动装载的类信息，Spring Boot 就是由此获取到类信息的
基于配置类的形式，用类取代 XML 文件
项目创建方式
官网创建项目: 从spring initializr官方创建
选择maven，java及java版本号
选择石侧Dependencies的ADD DEPENDENCIES添加Spr ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content right"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310201611564.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="Spring和SpringBoot区别"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/10/Java/SpringBoot/SpringBoot%20%E6%95%B4%E5%90%88%E6%8C%81%E4%B9%85%E5%B1%82%E6%A1%86%E6%9E%B6/" title="Spring和SpringBoot区别"><div class="article-title-link">Spring和SpringBoot区别</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-10T01:53:47.000Z" title="发表于 2023-07-10 09:53:47">2023-07-10</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/SpringBoot/">SpringBoot</a></span></div></div></div><a class="article-content" href="/smile/2023/07/10/Java/SpringBoot/SpringBoot%20%E6%95%B4%E5%90%88%E6%8C%81%E4%B9%85%E5%B1%82%E6%A1%86%E6%9E%B6/" title="Spring和SpringBoot区别"><div class="article-content-text">Spring和SpringBoot区别SpringBoot整合JdbcTemplateJdbcTemplate 是 Spring 自带的 JDBC 的模板组件，底层实现了对 JDBC 的封装，需要开发者自定义 SQL 语句，JdbcTemplate 帮助我们完成数据库连接，SQL 执行，结果集的封装

导入相关依赖

123456789&lt;dependency&gt;    &lt;groupId&gt;mysql&lt;/groupId&gt;    &lt;artifactId&gt;mysql-connector-java&lt;/artifactId&gt;&lt;/dependency&gt;&lt;dependency&gt;    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;    &lt;artifactId&gt;spring-boot-starter-jdbc&lt;/artifactId&gt;&lt;/dependency&gt;


创建实体类

12345678910package com ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content left"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310201611564.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="SpringBoot"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/10/Java/SpringBoot/SpringBoot/" title="SpringBoot"><div class="article-title-link">SpringBoot</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-10T01:53:46.000Z" title="发表于 2023-07-10 09:53:46">2023-07-10</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/SpringBoot/">SpringBoot</a></span></div></div></div><a class="article-content" href="/smile/2023/07/10/Java/SpringBoot/SpringBoot/" title="SpringBoot"><div class="article-content-text">SpringBootSpringBoot是什么Spring Boot可以快速构建基于 Spring 的 Java 应用，可以快速整合各种框架，不需要开发者进行配置，Spring Boot 会实现自动装配
SpringBoot优势
不需要任何的 XML 配置文件
内嵌 Tomcat 服务器，可以直接部署项目
默认支持 JSON 格式，不需要额外进行配置
支持 RESTful 风格

Spring Boot 和 Spring 的区别Spring Boot 是基于 Spring 的，简化了各种框架的引入方式，同时各种框架针对于 Spring Boot 和 Spring 的依赖也是不同的，Spring Boot 的依赖中添加了配置类的信息。
使用 Spring Boot 时需要注意，启动类一定要覆盖业务类
启动类所在的包必须是业务类的父包或者是同一个包
SpringBoot配置文件application 支持两种格式，properties 和 yml，SpringBoot 默认是 properties，但是实际开发中更推荐使用yml，因为它更简单 更直观
application.propert ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content right"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="SpringMVC数据校验Validator"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/05/Java/Spring/SpringMVC%E6%95%B0%E6%8D%AE%E6%A0%A1%E9%AA%8CValidator/" title="SpringMVC数据校验Validator"><div class="article-title-link">SpringMVC数据校验Validator</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-05T01:53:46.000Z" title="发表于 2023-07-05 09:53:46">2023-07-05</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/05/Java/Spring/SpringMVC%E6%95%B0%E6%8D%AE%E6%A0%A1%E9%AA%8CValidator/" title="SpringMVC数据校验Validator"><div class="article-content-text">SpringMVC数据校验Validator基于Validator接口Student类
123456789package com.example.entity;import lombok.Data;@Datapublic class Student &#123;    private String name;    private String password;&#125;

StudentValidator校验器
12345678910111213141516171819202122package com.example.validate;import com.example.entity.Student;import org.springframework.validation.Errors;import org.springframework.validation.ValidationUtils;import org.springframework.validation.Validator;public class StudentValidator implements Val ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content left"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="SpringMVC基于 RESTful 架构"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/05/Java/Spring/SpringMVC%E5%9F%BA%E4%BA%8E%20RESTful%20%E6%9E%B6%E6%9E%84/" title="SpringMVC基于 RESTful 架构"><div class="article-title-link">SpringMVC基于 RESTful 架构</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-05T01:53:46.000Z" title="发表于 2023-07-05 09:53:46">2023-07-05</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/05/Java/Spring/SpringMVC%E5%9F%BA%E4%BA%8E%20RESTful%20%E6%9E%B6%E6%9E%84/" title="SpringMVC基于 RESTful 架构"><div class="article-content-text">SpringMVC基于 RESTful 架构REST架构统一接口

GET（SELECT）：从服务器取出资源（一项或多项）。
POST（CREATE）：在服务器新建一个资源。
PUT（UPDATE）：在服务器更新资源（客户端提供完整资源数据）。
PATCH（UPDATE）：在服务器更新资源（客户端提供需要修改的资源数据）。
DELETE（DELETE）：从服务器删除资源。

传统请求：http://localhost:8080/index?title=tom&amp;num=10
RESTful 请求：http://localhost:8080/index/tom/10
Spring 扫描注入的注解@Component
@Controller
@Service
@Repository
Java 后台给客户端返回数据有两种形式@Controller
基于视图，将业务数据填充到视图中，以图形界面的形式返回，jsp&#x2F;html，浏览器可以直接加载
@RestController
纯数据，将业务数据直接返回，不需要嵌套视图，必须是 JSON 格式的数据
配置Json转换pom依赖
12 ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content right"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="SpringMVC常用注解"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/04/Java/Spring/SpringMVC%E5%B8%B8%E7%94%A8%E6%B3%A8%E8%A7%A3/" title="SpringMVC常用注解"><div class="article-title-link">SpringMVC常用注解</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-04T01:53:46.000Z" title="发表于 2023-07-04 09:53:46">2023-07-04</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/04/Java/Spring/SpringMVC%E5%B8%B8%E7%94%A8%E6%B3%A8%E8%A7%A3/" title="SpringMVC常用注解"><div class="article-content-text">SpringMVC常用注解@RequestMapping HTTP 请求映射到控制器方法，可以给类添加，也可以给方法添加指定请求的类型，GET、POST、PUT、DELETE
通过param关键字传参
12345@RequestMapping(value = &quot;/index&quot;,method = RequestMethod.GET,params = &#123;&quot;name&quot;,&quot;id=10&quot;&#125;)public String index()&#123;    System.out.println(&quot;执行了index业务&quot;);    return &quot;index&quot;;&#125;

取请求中的参数
1234567@RequestMapping(value = &quot;/index&quot;,method = RequestMethod.GET)public String index(@RequestParam(&quot;title&quot;) String name, @Reque ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content left"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="SpringMVC的ModelAndView"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/04/Java/Spring/SpringMVC%E7%9A%84ModelAndView/" title="SpringMVC的ModelAndView"><div class="article-title-link">SpringMVC的ModelAndView</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-04T01:53:46.000Z" title="发表于 2023-07-04 09:53:46">2023-07-04</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/04/Java/Spring/SpringMVC%E7%9A%84ModelAndView/" title="SpringMVC的ModelAndView"><div class="article-content-text">SpringMVC的ModelAndViewUser类
12345678910package com.example.entity;import lombok.Data;@Datapublic class User &#123;    private Integer id;    private String name;    private Integer age;&#125;

HelloHandler控制器
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647package com.example.controller;import com.example.entity.User;import org.springframework.stereotype.Controller;import org.springframework.web.bind.annotation.PathVariable;import org.springframework.web.bind ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content right"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="SpringMVC配置"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/04/Java/Spring/SpringMVC%E9%85%8D%E7%BD%AE/" title="SpringMVC配置"><div class="article-title-link">SpringMVC配置</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-04T01:53:46.000Z" title="发表于 2023-07-04 09:53:46">2023-07-04</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/04/Java/Spring/SpringMVC%E9%85%8D%E7%BD%AE/" title="SpringMVC配置"><div class="article-content-text">SpringMVC配置SpringMVC是什么？Spring 框架用来提供 Web 服务的组件，Spring MVC 属于 Spring 框架，Spring Web MVC，简称 SpringMVC
SpringMVC的核心组件
DispatcherServlet：前端控制器，负责调度，可以降低不同组件之间的耦合度，是整个 Spring MVC 的核心模块
Handler：处理器，完成具体的业务逻辑，相当于Servlet
HandlerMapping：DispatcherServlet 是通过HandlerMapping 将请求映射到不同的 Handler
HandlerInterceptor：处理器拦截器，是一个接口，如果需要进行某些拦截处理，可以通过实现该接口来完成
HandlerExecutionChain：处理器执行链，包括两部分：Handler 和 HandlerInterceptor
HandlerAdapter：处理器适配器，在执行业务逻辑之前，对数据进行处理，数据校验、表单封装
ModelAndView：装载了模型数据和视图信息，作为Handler 的处理结果，返回给  ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content left"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="IoC控制反转"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/03/Java/Spring/IoC%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC/" title="IoC控制反转"><div class="article-title-link">IoC控制反转</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-03T01:53:46.000Z" title="发表于 2023-07-03 09:53:46">2023-07-03</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/03/Java/Spring/IoC%E6%8E%A7%E5%88%B6%E5%8F%8D%E8%BD%AC/" title="IoC控制反转"><div class="article-content-text">IoC控制反转
什么是控制反转IoC？
举个现实生活的例子


假设你希望在不同互联网平台上展示一致的头像，例如个人网站、博客、内容平台、社交平台和招聘平台Q，等等。对创作者而言这是个常见需求，因为一致的形象有助于提高个人辨识度，从而增加影响力。
如果你维护着10个平台的账号，那么每次更换头像都要去10个账号上重复上传同一张图像，显然不太方便。
于是有了 Gravatar 这样的“头像配置中心”。你可以在 Gravatar 配置自己的头像，然后在支持Gravatar 的互联网平台上关联自己的 Gravatar 账号。这样一来，只要更新了 Gravatar 头像，那么所有那些关联了 Gravatar 账号的互联网平台都会自动更新头像
换言之，你在互联网平台为自己账号设置的不是头像文件本身，而是“如何获取我的最新头像”的方法: 调用 Gravatar的 API。
控制反转Q (loC)也是同样的思想，只不过是在组件层面,
例如，你写了一个组件 A，负责计算一件商品中所包含的税款。很多组件都用到了组件 A，或者说它们都“依赖”组件 A.
有一天，计算税款%的方法变了。也许是政策调整、也许是公 ...</div></a><div class="recent-post-arrow"></div></div></div><div class="recent-post-item"><div class="recent-post-content right"><div class="recent-post-cover"><img class="article-cover" src="https://gitee.com/leesmile/image-host/raw/master/images/202310261532603.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="aop面向切面编程"></div><div class="recent-post-info"><a class="article-title" href="/smile/2023/07/03/Java/Spring/aop%E9%9D%A2%E5%90%91%E5%88%87%E9%9D%A2%E7%BC%96%E7%A8%8B/" title="aop面向切面编程"><div class="article-title-link">aop面向切面编程</div></a><div class="recent-post-meta"><div class="article-meta-wrap"><span class="post-meta-date"><i class="far fa-calendar-alt"></i><span class="article-meta-label">发表于</span><time datetime="2023-07-03T01:53:46.000Z" title="发表于 2023-07-03 09:53:46">2023-07-03</time></span><span class="article-meta"><span class="article-meta-separator"> |</span><svg class="meta_icon post-ui-icon" style="width:12px;height:12px;position:relative;top:1px"><use xlink:href="#icon-fenlei"></use></svg><a class="article-meta__categories" href="/smile/categories/Java/">Java</a><i class="fas fa-angle-right article-meta-link"></i><a class="article-meta__categories" href="/smile/categories/Java/Spring/">Spring</a></span></div></div></div><a class="article-content" href="/smile/2023/07/03/Java/Spring/aop%E9%9D%A2%E5%90%91%E5%88%87%E9%9D%A2%E7%BC%96%E7%A8%8B/" title="aop面向切面编程"><div class="article-content-text">aop面向切面编程AOP：Aspect Oriented Programming
面向切面编程 
OOP：Object Oriented Programmin
面向对象编程
AOP 是对 OOP 的一个补充，是在另外一个维度抽象出对象
具体是指程序运行时动态地将非业务代码切入到业务代码中，从而实现代码的解耦合，将非业务代码抽象成一个对象，对该对象进行编程就是面向切面编程。

AOP 的优点
降低了模块间的耦合度
提高了代码的可维护性
提高了代码的复用性
集中和分开管理非业务代码和业务代码，逻辑更清洗

AOP 的实现是基于动态代理的
CalImp 只完成业务代码，运算，不打印日志
代理类必须具备委托类的所有功能
12345678package com.example.aop;public interface Cal &#123;    public int add(int num1, int num2);    public int sub(int num1, int num2);    public int mul(int num1, int num2);    public int ...</div></a><div class="recent-post-arrow"></div></div></div><nav id="pagination"><div class="pagination"><a class="extend prev" rel="prev" href="/smile/page/9/#content-inner"><i class="fas fa-chevron-left fa-fw"></i></a><a class="page-number" href="/smile/">1</a><span class="space">&hellip;</span><a class="page-number" href="/smile/page/9/#content-inner">9</a><span class="page-number current">10</span><a class="page-number" href="/smile/page/11/#content-inner">11</a><a class="page-number" href="/smile/page/12/#content-inner">12</a><a class="extend next" rel="next" href="/smile/page/11/#content-inner"><i class="fas fa-chevron-right fa-fw"></i></a></div></nav></div><div class="aside-content" id="aside-content"><div class="card-widget card-info"><div class="author_top is-center"><div class="avatar-img"><img src="https://leesmile.gitee.io/smile/img/avatarImg.bmp" onerror="this.onerror=null;this.src='/smile/img/friend_404.gif'" alt="avatar"/></div><div class="author-info__name">Xuan</div><div class="author-info__description"></div></div><div class="card-info-data site-data is-center"><a href="/smile/archives/"><div class="headline">文章</div><div class="length-num">142</div></a><a href="/smile/tags/"><div class="headline">标签</div><div class="length-num">36</div></a><a href="/smile/categories/"><div class="headline">分类</div><div class="length-num">32</div></a></div><a id="card-info-btn" target="_blank" rel="noopener" href="https://github.com/xxxxxx"><i class="fab fa-github"></i><span>Follow Me</span></a></div><div class="card-widget card-announcement"><div class="item-headline"><i class="fas fa-bullhorn fa-shake"></i><span>公告</span></div><div class="announcement_content">This is my Blog</div></div><div class="sticky_layout"><div class="card-widget card-recent-post"><div class="item-headline"><i class="fas fa-history"></i><span>最新文章</span></div><div class="aside-list"><div class="aside-list-item"><a class="thumbnail" href="/smile/2024/04/08/%E4%B8%8D%E5%90%8C%E8%A7%92%E5%BA%A6%E5%87%BA%E5%8F%91%E5%8E%BB%E9%9C%80%E6%B1%82%E6%B2%9F%E9%80%9A%E9%97%AE%E9%A2%98/" title="不同角度出发去需求沟通问题"><img src="https://gitee.com/leesmile/image-host/raw/master/images/202310271509358.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="不同角度出发去需求沟通问题"/></a><div class="content"><a class="title" href="/smile/2024/04/08/%E4%B8%8D%E5%90%8C%E8%A7%92%E5%BA%A6%E5%87%BA%E5%8F%91%E5%8E%BB%E9%9C%80%E6%B1%82%E6%B2%9F%E9%80%9A%E9%97%AE%E9%A2%98/" title="不同角度出发去需求沟通问题">不同角度出发去需求沟通问题</a><time datetime="2024-04-08T07:55:46.000Z" title="发表于 2024-04-08 15:55:46">2024-04-08</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/smile/2024/04/01/%E4%BA%A7%E5%93%81%E5%95%86%E4%B8%9A%E8%AE%A1%E5%88%92%E6%96%B9%E5%90%91%E6%80%9D%E8%80%83/" title="产品商业计划方向思考"><img src="https://gitee.com/leesmile/image-host/raw/master/images/202310271509358.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="产品商业计划方向思考"/></a><div class="content"><a class="title" href="/smile/2024/04/01/%E4%BA%A7%E5%93%81%E5%95%86%E4%B8%9A%E8%AE%A1%E5%88%92%E6%96%B9%E5%90%91%E6%80%9D%E8%80%83/" title="产品商业计划方向思考">产品商业计划方向思考</a><time datetime="2024-04-01T07:55:46.000Z" title="发表于 2024-04-01 15:55:46">2024-04-01</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/smile/2024/03/28/%E5%85%AC%E5%8F%B8%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E8%90%BD%E5%9C%B0%E7%9A%84%E9%9A%BE%E7%82%B9/" title="公司自动化测试落地的难点"><img src="https://gitee.com/leesmile/image-host/raw/master/images/202310271509358.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="公司自动化测试落地的难点"/></a><div class="content"><a class="title" href="/smile/2024/03/28/%E5%85%AC%E5%8F%B8%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95%E8%90%BD%E5%9C%B0%E7%9A%84%E9%9A%BE%E7%82%B9/" title="公司自动化测试落地的难点">公司自动化测试落地的难点</a><time datetime="2024-03-28T07:55:46.000Z" title="发表于 2024-03-28 15:55:46">2024-03-28</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/smile/2024/03/22/%E5%BC%82%E6%AD%A5%E4%BB%BB%E5%8A%A1%E7%9A%84%E5%85%B3%E9%94%AE%E5%9C%A8%E4%BA%A4%E4%BA%92%E8%AE%BE%E8%AE%A1/" title="异步任务的体验关键在交互设计"><img src="https://gitee.com/leesmile/image-host/raw/master/images/202310271509358.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="异步任务的体验关键在交互设计"/></a><div class="content"><a class="title" href="/smile/2024/03/22/%E5%BC%82%E6%AD%A5%E4%BB%BB%E5%8A%A1%E7%9A%84%E5%85%B3%E9%94%AE%E5%9C%A8%E4%BA%A4%E4%BA%92%E8%AE%BE%E8%AE%A1/" title="异步任务的体验关键在交互设计">异步任务的体验关键在交互设计</a><time datetime="2024-03-22T07:55:46.000Z" title="发表于 2024-03-22 15:55:46">2024-03-22</time></div></div><div class="aside-list-item"><a class="thumbnail" href="/smile/2024/03/11/Git%E5%B7%A5%E4%BD%9C%E6%B5%81/" title="Git工作流"><img src="https://gitee.com/leesmile/image-host/raw/master/images/202310261354386.jpg" onerror="this.onerror=null;this.src='/smile/img/404.jpg'" alt="Git工作流"/></a><div class="content"><a class="title" href="/smile/2024/03/11/Git%E5%B7%A5%E4%BD%9C%E6%B5%81/" title="Git工作流">Git工作流</a><time datetime="2024-03-11T07:55:46.000Z" title="发表于 2024-03-11 15:55:46">2024-03-11</time></div></div></div></div><div class="card-widget card-categories"><div class="item-headline">
            <i class="fas fa-folder-open"></i>
            <span>分类</span>
            <a class="card-more-btn" href="/smile/categories/" title="查看更多">
    <i class="fas fa-angle-right"></i></a>
            </div>
            <ul class="card-category-list" id="aside-cat-list">
            <li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/ELK/"><span class="card-category-list-name">ELK</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Gitee/"><span class="card-category-list-name">Gitee</span><span class="card-category-list-count">1</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Java/"><span class="card-category-list-name">Java</span><span class="card-category-list-count">74</span></a><ul class="card-category-list child"><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Java/JavaSE/"><span class="card-category-list-name">JavaSE</span><span class="card-category-list-count">10</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Java/JavaWeb/"><span class="card-category-list-name">JavaWeb</span><span class="card-category-list-count">4</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Java/MySQL/"><span class="card-category-list-name">MySQL</span><span class="card-category-list-count">3</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Java/Spring/"><span class="card-category-list-name">Spring</span><span class="card-category-list-count">7</span></a></li><li class="card-category-list-item "><a class="card-category-list-link" href="/smile/categories/Java/SpringBoot/"><span class="card-category-list-name">SpringBoot</span><span class="card-category-list-count">7</span></a></li></ul></li>
            </ul></div><div class="card-widget card-tags"><div class="item-headline"><i class="fas fa-tags"></i><span>标签</span></div><div class="card-tag-cloud"><a href="/smile/tags/docker/" style="font-size: 1.14em; color: #999a9c">docker</a> <a href="/smile/tags/%E7%BA%BF%E7%A8%8B/" style="font-size: 1.17em; color: #999ca0">线程</a> <a href="/smile/tags/windows/" style="font-size: 1.1em; color: #999">windows</a> <a href="/smile/tags/%E5%BA%8F%E5%88%97%E5%8C%96%E5%92%8C%E5%8F%8D%E5%BA%8F%E5%88%97%E5%8C%96/" style="font-size: 1.14em; color: #999a9c">序列化和反序列化</a> <a href="/smile/tags/SQL/" style="font-size: 1.1em; color: #999">SQL</a> <a href="/smile/tags/Linux/" style="font-size: 1.32em; color: #99a2ae">Linux</a> <a href="/smile/tags/JavaScript/" style="font-size: 1.25em; color: #999fa7">JavaScript</a> <a href="/smile/tags/Java/" style="font-size: 1.5em; color: #99a9bf">Java</a> <a href="/smile/tags/git/" style="font-size: 1.1em; color: #999">git</a> <a href="/smile/tags/rabbitMQ/" style="font-size: 1.46em; color: #99a8bc">rabbitMQ</a> <a href="/smile/tags/aop/" style="font-size: 1.1em; color: #999">aop</a> <a href="/smile/tags/Socket/" style="font-size: 1.1em; color: #999">Socket</a> <a href="/smile/tags/%E5%89%8D%E7%AB%AF/" style="font-size: 1.21em; color: #999da3">前端</a> <a href="/smile/tags/SpringBoot/" style="font-size: 1.25em; color: #999fa7">SpringBoot</a> <a href="/smile/tags/%E6%95%B0%E6%8D%AE%E5%A4%84%E7%90%86/" style="font-size: 1.14em; color: #999a9c">数据处理</a> <a href="/smile/tags/%E7%AB%AF%E5%8F%A3/" style="font-size: 1.14em; color: #999a9c">端口</a> <a href="/smile/tags/Gitee/" style="font-size: 1.1em; color: #999">Gitee</a> <a href="/smile/tags/MySQL/" style="font-size: 1.17em; color: #999ca0">MySQL</a> <a href="/smile/tags/%E6%80%9D%E8%80%83/" style="font-size: 1.1em; color: #999">思考</a> <a href="/smile/tags/%E5%9B%BE%E5%BA%8A/" style="font-size: 1.1em; color: #999">图床</a> <a href="/smile/tags/nvm/" style="font-size: 1.1em; color: #999">nvm</a> <a href="/smile/tags/%E4%B8%9A%E5%8A%A1/" style="font-size: 1.25em; color: #999fa7">业务</a> <a href="/smile/tags/%E9%9B%86%E5%90%88%E6%A1%86%E6%9E%B6/" style="font-size: 1.35em; color: #99a3b1">集合框架</a> <a href="/smile/tags/Selenium/" style="font-size: 1.28em; color: #99a0aa">Selenium</a> <a href="/smile/tags/IDEA/" style="font-size: 1.17em; color: #999ca0">IDEA</a> <a href="/smile/tags/%E6%B5%8B%E8%AF%95%E5%B9%B3%E5%8F%B0/" style="font-size: 1.14em; color: #999a9c">测试平台</a> <a href="/smile/tags/%E6%8E%A5%E5%8F%A3/" style="font-size: 1.32em; color: #99a2ae">接口</a> <a href="/smile/tags/%E4%B8%AD%E9%97%B4%E4%BB%B6/" style="font-size: 1.43em; color: #99a6b8">中间件</a> <a href="/smile/tags/%E8%87%AA%E5%8A%A8%E5%8C%96%E6%B5%8B%E8%AF%95/" style="font-size: 1.39em; color: #99a5b5">自动化测试</a> <a href="/smile/tags/%E6%B5%8B%E8%AF%95%E6%96%B9%E6%A1%88%E8%AE%BE%E8%AE%A1/" style="font-size: 1.1em; color: #999">测试方案设计</a> <a href="/smile/tags/ELK/" style="font-size: 1.1em; color: #999">ELK</a> <a href="/smile/tags/%E4%BB%A3%E7%90%86/" style="font-size: 1.1em; color: #999">代理</a> <a href="/smile/tags/JDK/" style="font-size: 1.1em; color: #999">JDK</a> <a href="/smile/tags/%E6%80%A7%E8%83%BD%E6%B5%8B%E8%AF%95/" style="font-size: 1.21em; color: #999da3">性能测试</a> <a href="/smile/tags/%E6%80%A7%E8%83%BD%E7%BB%9F%E8%AE%A1/" style="font-size: 1.1em; color: #999">性能统计</a> <a href="/smile/tags/JavaWeb/" style="font-size: 1.1em; color: #999">JavaWeb</a></div></div><div class="card-widget card-archives"><div class="item-headline"><i class="fas fa-archive"></i><span>归档</span><a class="card-more-btn" href="/smile/archives/" title="查看更多">
    <i class="fas fa-angle-right"></i></a></div><ul class="card-archive-list"><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2024/04/"><span class="card-archive-list-date">四月 2024</span><span class="card-archive-list-count">2</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2024/03/"><span class="card-archive-list-date">三月 2024</span><span class="card-archive-list-count">8</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2024/02/"><span class="card-archive-list-date">二月 2024</span><span class="card-archive-list-count">6</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2024/01/"><span class="card-archive-list-date">一月 2024</span><span class="card-archive-list-count">17</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2023/12/"><span class="card-archive-list-date">十二月 2023</span><span class="card-archive-list-count">13</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2023/11/"><span class="card-archive-list-date">十一月 2023</span><span class="card-archive-list-count">22</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2023/10/"><span class="card-archive-list-date">十月 2023</span><span class="card-archive-list-count">19</span></a></li><li class="card-archive-list-item"><a class="card-archive-list-link" href="/smile/archives/2023/08/"><span class="card-archive-list-date">八月 2023</span><span class="card-archive-list-count">4</span></a></li></ul></div><div class="card-widget card-webinfo"><div class="item-headline"><i class="fas fa-chart-line"></i><span>网站资讯</span></div><div class="webinfo"><div class="webinfo-item"><div class="item-name">文章数目 :</div><div class="item-count">142</div></div><div class="webinfo-item"><div class="item-name">本站访客数 :</div><div class="item-count" id="busuanzi_value_site_uv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">本站总访问量 :</div><div class="item-count" id="busuanzi_value_site_pv"><i class="fa-solid fa-spinner fa-spin"></i></div></div><div class="webinfo-item"><div class="item-name">最后更新时间 :</div><div class="item-count" id="last-push-date" data-lastPushDate="2024-04-09T01:45:26.864Z"><i class="fa-solid fa-spinner fa-spin"></i></div></div></div></div></div></div></main><footer id="footer"><div id="footer-wrap"><div class="copyright">&copy;2020 - 2024 By Xuan</div><div class="framework-info"><span>框架 </span><a target="_blank" rel="noopener" href="https://hexo.io">Hexo</a><span class="footer-separator">|</span><span>主题 </span><a target="_blank" rel="noopener" href="https://github.com/jerryc127/hexo-theme-butterfly">Butterfly</a></div></div></footer></div><div id="rightside"><div id="rightside-config-hide"><button id="darkmode" type="button" title="浅色和深色模式转换"><i class="fas fa-adjust"></i></button><button id="hide-aside-btn" type="button" title="单栏和双栏切换"><i class="fas fa-arrows-alt-h"></i></button></div><div id="rightside-config-show"><button id="rightside_config" type="button" title="设置"><i class="fas fa-cog fa-spin"></i></button><button id="go-up" type="button" title="回到顶部"><span class="scroll-percent"></span><i class="fas fa-arrow-up"></i><span id="percent">0<span>%</span></span></button><button id="go-down" type="button" title="直达底部" onclick="btf.scrollToDest(document.body.scrollHeight, 500)"><i class="fas fa-arrow-down"></i></button></div></div><div><script src="/smile/js/utils.js"></script><script src="/smile/js/main.js"></script><script src="https://cdn.jsdelivr.net/npm/@fancyapps/ui/dist/fancybox/fancybox.umd.min.js"></script><div class="js-pjax"></div><script async src="https://cdn1.tianli0.top/npm/vue@2.6.14/dist/vue.min.js"></script><script async src="https://cdn1.tianli0.top/npm/element-ui@2.15.6/lib/index.js"></script><script defer src="/js/cursor.js"></script><script async src="//npm.elemecdn.com/pace-js@1.2.4/pace.min.js"></script><script defer src="https://npm.elemecdn.com/jquery@latest/dist/jquery.min.js"></script><script defer data-pjax src="/js/cat.js"></script><script defer data-pjax src="/js/readPercent.js"></script><script async data-pjax src="//busuanzi.ibruce.info/busuanzi/2.3/busuanzi.pure.mini.js"></script></div><!-- hexo injector body_end start --> <script data-pjax>if(document.getElementById('recent-posts') && (location.pathname ==='/'|| '/' ==='all')){
    var parent = document.getElementById('recent-posts');
    var child = '<div class="recent-post-item" style="width:100%;height: auto"><div id="catalog_magnet"><a class="magnet_link_more"  href="http://leesmile.gitee.io/smile/categories" style="flex:1;text-align: center;margin-bottom: 10px;">查看更多...</a></div></div>';
    console.log('已挂载magnet')
    parent.insertAdjacentHTML("afterbegin",child)}
     </script><style>#catalog_magnet{flex-wrap: wrap;display: flex;width:100%;justify-content:space-between;padding: 10px 10px 0 10px;align-content: flex-start;}.magnet_item{flex-basis: calc(50% - 5px);background: #87CEFA;margin-bottom: 10px;border-radius: 8px;transition: all 0.2s ease-in-out;}.magnet_item:hover{background: #00FFFF}.magnet_link_more{color:#555}.magnet_link{color:black}.magnet_link:hover{color:white}@media screen and (max-width: 600px) {.magnet_item {flex-basis: 100%;}}.magnet_link_context{display:flex;padding: 10px;font-size:16px;transition: all 0.2s ease-in-out;}.magnet_link_context:hover{padding: 10px 20px;}</style>
    <style></style><script data-pjax>
  function butterfly_footer_beautify_injector_config(){
    var parent_div_git = document.getElementById('footer-wrap');
    var item_html = '<div id="workboard"></div><p id="ghbdages"><a class="github-badge" target="_blank" href="https://hexo.io/" style="margin-inline:5px" data-title="博客框架为Hexo_v6.2.0" title=""><img src="https://img.shields.io/badge/Frame-Hexo-blue?style=flat&amp;logo=hexo" alt=""/></a><a class="github-badge" target="_blank" href="https://butterfly.js.org/" style="margin-inline:5px" data-title="主题版本Butterfly_v4.3.1" title=""><img src="https://img.shields.io/badge/Theme-Butterfly-6513df?style=flat&amp;logo=bitdefender" alt=""/></a><a class="github-badge" target="_blank" href="https://gitee.com/" style="margin-inline:5px" data-title="本站项目由Gitee托管" title=""><img src="https://img.shields.io/badge/Source-Github-d021d6?style=flat&amp;logo=GitHub" alt=""/></a><a class="github-badge" target="_blank" href="http://creativecommons.org/licenses/by-nc-sa/4.0/" style="margin-inline:5px" data-title="本站采用知识共享署名-非商业性使用-相同方式共享4.0国际许可协议进行许可" title=""><img src="https://img.shields.io/badge/Copyright-BY--NC--SA%204.0-d42328?style=flat&amp;logo=Claris" alt=""/></a></p>';
    console.log('已挂载butterfly_footer_beautify')
    parent_div_git.insertAdjacentHTML("beforeend",item_html)
    }
  var elist = 'null'.split(',');
  var cpage = location.pathname;
  var epage = 'all';
  var flag = 0;

  for (var i=0;i<elist.length;i++){
    if (cpage.includes(elist[i])){
      flag++;
    }
  }

  if ((epage ==='all')&&(flag == 0)){
    butterfly_footer_beautify_injector_config();
  }
  else if (epage === cpage){
    butterfly_footer_beautify_injector_config();
  }
  </script><script async src="https://npm.elemecdn.com/hexo-butterfly-footer-beautify@1.0.0/lib/runtime.js"></script><!-- hexo injector body_end end --></body></html>